option(EXTERNAL_BOOST "Use external boost" ON)
if (EXTERNAL_BOOST)
  find_package(Boost 1.39.0 COMPONENTS program_options )
  if(NOT Boost_FOUND)
    message(FATAL_ERROR "Boost not found,  make sure you have also installed boost and it's dev package or use our internal replacement set -DEXTERNAL_BOOST=OFF")
  endif(NOT Boost_FOUND)
  include_directories(${Boost_INCLUDE_DIRS})
  set (BOOST_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY})
  set (BOOST_PKG)
  set (BOOST_CFLAGS_PKG "-I${Boost_INCLUDE_DIRS}")
  string(REGEX REPLACE "^(.*)/lib([^/]*)\\.[^.]*$" "-L\\1 -l\\2" BOOST_LIBS_PKG ${BOOST_LIBRARIES})
else(EXTERNAL_BOOST)
  include_directories(${CMAKE_SOURCE_DIR}/src/libboost)
  add_subdirectory(libboost)
  set (BOOST_LIBRARIES votca_boost)
  set (BOOST_PKG "libvotca_boost")
  set (BOOST_LIBS_PKG)
  set (BOOST_CFLAGS_PKG)
endif(EXTERNAL_BOOST)
add_subdirectory(libtools)
add_subdirectory(tools)

